// pages/yuyuesj/yuyuesj.js
Page({
  data: {
    ks: '',
    time:'',
    name:'',
    currentTab: 0,
    content:[{'name':'谢文婷','work':'主任','data1':'11-30','week1':'星期一','time1':'停诊','data2':'12-01','week2':'星期二','time2':'停诊','data3':'12-02','week3':'星期三','time3':'-',},
    {'name':'肖雨婷','work':'主治医师','data1':'11-30','week1':'星期一','time1':'停诊','data2':'12-01','week2':'星期二','time2':'停诊','data3':'12-02','week3':'星期三','time3':'-',},
    {'name':'杨佳豪','work':'院长','data1':'11-30','week1':'星期一','time1':'停诊','data2':'12-01','week2':'星期二','time2':'停诊','data3':'12-02','week3':'星期三','time3':'-',},
    {'name':'黄子奇','work':'院长','data1':'11-30','week1':'星期一','time1':'停诊','data2':'12-01','week2':'星期二','time2':'停诊','data3':'12-02','week3':'星期三','time3':'-',}],
    biaotou: [{'data':'11-30','week':'星期一'},{'data':'12-01','week':'星期二'},{'data':'12-02','week':'星期三'}],
    yisheng: [
      {'name':'谢文婷','work':'主任医师','time1':'停诊','time2':'-','time3':'-','time4':'-','time5':'-','time6':'-'},
      {'name':'肖雨婷','work':'副主任医师','time1':'已满','time2':'-','time3':'-','time4':'-','time5':'-','time6':'-'},
      {'name':'杨佳豪','work':'副主任医师','time1':'-','time2':'-','time3':'-','time4':'-','time5':'-','time6':'-'},
      {'name':'张洋嘉','work':'主治医师','time1':'-','time2':'-','time3':'-','time4':'-','time5':'-','time6':'-'},
      {'name':'黄子奇','work':'主治医师','time1':'-','time2':'-','time3':'-','time4':'-','time5':'-','time6':'-'},
      {'name':'谢文婷','work':'主治医师','time1':'-','time2':'-','time3':'-','time4':'-','time5':'-','time6':'-'},],
    shijian: [
      {'sj':'08:00~08:30','num':'一','time1':'余53','time2':'-','time3':'-'},
      {'sj':'08:30~09:00','num':'二','time1':'-','time2':'余28','time3':'-'},
      {'sj':'09:00~09:30','num':'三','time1':'余53','time2':'余26','time3':'-'},
      {'sj':'09:30~10:00','num':'四','time1':'-','time2':'-','time3':'-'},
      {'sj':'10:00~10:30','num':'五','time1':'-','time2':'余37','time3':'-'},
      {'sj':'10:30~11:00','num':'六','time1':'余22','time2':'-','time3':'-'},
      {'sj':'11:00~11:30','num':'七','time1':'余53','time2':'-','time3':'-'},
      {'sj':'11:30~12:00','num':'八','time1':'余53','time2':'-','time3':'-'},
      {'sj':'12:00~12:30','num':'九','time1':'余53','time2':'-','time3':'-'},
      {'sj':'12:30~13:00','num':'十','time1':'余53','time2':'-','time3':'-'},
      {'sj':'13:00~13:30','num':'十一','time1':'余53','time2':'-','time3':'-'},
      {'sj':'13:30~14:00','num':'十二','time1':'余53','time2':'-','time3':'-'},
      {'sj':'14:00~14:30','num':'十三','time1':'余53','time2':'-','time3':'-'},
      {'sj':'14:30~15:00','num':'十四','time1':'余53','time2':'-','time3':'-'},
      {'sj':'15:00~15:30','num':'十五','time1':'余53','time2':'-','time3':'-'},
      {'sj':'15:30~16:00','num':'十六','time1':'余53','time2':'-','time3':'-'},
      {'sj':'16:00~16:30','num':'十七','time1':'余53','time2':'-','time3':'-'},
      {'sj':'16:30~17:00','num':'十八','time1':'余53','time2':'-','time3':'-'},
      {'sj':'17:00~17:30','num':'十九','time1':'余53','time2':'-','time3':'-'},]
  },
  navbarTap: function(e){
    this.setData({
      currentTab: e.currentTarget.dataset.idx
    })
    console.log('currentTab', this.data.currentTab)
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this
    //option为上个页面传递过来的参数
    wx.getStorage({
        key: 'ks',
        success: function(res) {
          that.setData({ ks: res.data })
        },
      })
  },
  goyuyue(e) {
    console.log(e.currentTarget.dataset.id)
    console.log('ks', e.currentTarget.dataset.id.time)
    this.setData({
      ks: e.currentTarget.dataset.id.ks
    })
    console.log('ks1', this.data.ks)
    wx.navigateTo({
      url: '/pages/yuyueym/yuyueym'
    })
    wx.setStorage({
      key: 'time',
      data: this.data.time,
    })
  },
  goyisheng(e) {
    console.log(e.currentTarget.dataset.id)
    wx.navigateTo({
      url: '/pages/yuyueym/yuyueym'
    })
    wx.setStorage({
      key: 'name',
      data: this.data.name,
    })
  },
})